package com.example.administrator.dagger2demo.ui.login;

import android.util.Log;

import dagger.Module;
import dagger.Provides;

/**
 * dagger2 模块 通过注入View 给P层 IndexPresenter ,@Inject 标记 {@link LoginPresenter }构造函数
 * {@link LoginPresenter }
 */
@Module
public class LoginPresenterModule {

    private final LoginContract.View mview;

    public LoginPresenterModule(LoginContract.View view) {
        Log.i("TAG",view==null?"进入了...IndexPresenterModule-is null":"进入了...IndexPresenterModule-not null");
        this.mview = view;
    }

    @Provides
    LoginContract.View provideLoginContractView() {
        return mview;
    }

}
